package org.jeecg.modules.demo.cdz.alarm.camera.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.demo.yyc.reportdaily.entity.PlatformDaily;
import org.jeecg.modules.demo.yyc.reportdaily.entity.Report;
import org.jeecg.modules.demo.yyc.reportdaily.service.IPlatformDailyService;
import org.jeecg.modules.system.controller.CommonController;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
* @Description: 运营日报
* @Author: jeecg-boot
* @Date:   2022-11-01
* @Version: V1.0
*/
@Api(tags="运营日报")
@RestController
@RequestMapping("/cdz.alarm")
@Slf4j
public class FireAlarmController extends JeecgController<PlatformDaily, IPlatformDailyService> {

    @Resource
    private CommonController commonController;

    /**
     *
     * @param files
     * @param cameraid
     * @param picid
     * @param filetype
     * @param x
     * @param y
     * @param width
     * @param height
     * @param time
     * @param req
     * @return
     */
   //@AutoLog(value = "运营日报-分页列表查询")
   @ApiOperation(value="运营日报-分页列表查询", notes="运营日报-分页列表查询")
   @PostMapping(value = "/upload")
   public Result<Report> upload(@RequestParam MultipartFile files,
                                String cameraid,
                                String picid,
                                String filetype,
                                String x,
                                String y,
                                String width,
                                String height,
                                String time,
                                HttpServletRequest req) {
       System.out.println("cameraid:"+cameraid);
       commonController.uploadLocal(files,"");
       return Result.OK("");
   }

}
